package InheritanceAndPolymorphism.demo03;

public class Adult extends Residents{
    /**
     * 成人继承自居民，多包含学历、职业两项数据；
     */
    // 成人类，继承自居民类
        private String education;
        private String occupation;

        public Adult(String idNumber, String name, String birthDate, String education, String occupation) {
            super(idNumber, name, birthDate);
            this.education = education;
            this.occupation = occupation;
        }

        public String getEducation() {
            return education;
        }

        public void setEducation(String education) {
            this.education = education;
        }
        public String getOccupation() {
            return occupation;
        }

        public void setOccupation(String occupation) {
            this.occupation = occupation;
        }
}
